@extends('backend::modal')
@section('title',$page_title)
@section('content')
    <div class="row">
        <div class="col-lg-12">
            @component('backend::component.form.form')
                @slot('page_title') {{$page_title}} @endslot
                @slot('formId') edit @endslot
                @slot('action') {{route('b_ChangeType_update',['id'=>$info->id])}} @endslot

                @component('backend::component.form.form-group')
                    @slot('title') 类型名称 @endslot
                    @component('backend::component.form.input')
                        @slot('name') title @endslot
                        @slot('value') {{$info->title}} @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 图标 @endslot
                    <div class="layui-input-block">
                        <input type="text" id="iconPicker" name="icon" class="form-control" value="{{$info->icon ?? 'hcl-default'}}">
                    </div>
                @endcomponent

                @slot('buttons')
                    @component('backend::component.form.button')
                        @slot('title') 提交 @endslot
                        @slot('params') {"formId":"#edit"} @endslot
                        @slot('class') btn-min-width ajax-form @endslot
                    @endcomponent
                    @component('backend::component.form.button')
                        @slot('title') 重置 @endslot
                        @slot('type') reset @endslot
                        @slot('color') danger @endslot
                        @slot('class') btn-min-width @endslot
                    @endcomponent
                @endslot
            @endcomponent
        </div>
        <!--/.col-->
    </div>
@endsection
@push('scripts')
    <script>
        layui.use(['iconPicker'], function(){
            var iconPicker = layui.iconPicker;
            iconPickerMenu();
            function  iconPickerMenu() {
                iconPicker.render({
                    // 选择器，推荐使用input
                    elem: '#iconPicker',
                    // 数据类型：fontClass/unicode，推荐使用fontClass
                    type: 'fontClass',
                    // 是否开启搜索：true/false
                    search: true,
                    iconClass:'hcl',
                    // 是否开启分页
                    page: true,
                    // 每页显示数量，默认12
                    limit: 12
                });
                iconPicker.checkIcon('iconPicker', '{{$info->icon ?? "hcl-default"}}','hcl');
            }
        });
    </script>
@endpush